package xcmg.device.infra.exception;

import xcmg.device.infra.ErrorCode;

/**
 * 通用异常信息
 */
public class CommonBusiExceptions extends RuntimeException {

    // 返回code
    private int code;

    private String message;

    /**
     * 缺货定义错误码
     */
    public static final int OOS_FAIL = 400;

    public CommonBusiExceptions(String message) {
        super(message);
        this.code = ErrorCode.UnExceptedError.getCode();
        this.message = message;
    }

    public CommonBusiExceptions(int code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
